Skip to content

Don't map user-defined expressions#123

Merged
nunoplopes merged 5 commits into
Cpp2Rust:masterfrom
lucic71:user-defined
May 19, 2026
Merged

Don't map user-defined expressions#123
nunoplopes merged 5 commits into
Cpp2Rust:masterfrom
lucic71:user-defined

Conversation

@lucic71
Copy link
Copy Markdown
Contributor

@lucic71 lucic71 commented May 19, 2026

If the user code redefines strchr, don't apply the translation rules on the user-defined strchr, instead call the user-defined strchr.

@lucic71 lucic71 mentioned this pull request May 19, 2026
Comment thread tests/unit/user_defined_same_as_libc.c Outdated
}

int main() {
FILE *fp = fopen("/etc/passwd", "r");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's avoid this kind of jokes..

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I changed to /tmp/irrelevant-file

@nunoplopes nunoplopes merged commit f4ba247 into Cpp2Rust:master May 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants